package thread;

import java.util.Scanner;

public class Demo1 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入倒计时时间:");
        for (int i=scanner.nextInt();i>0;i--){
            try {
                System.out.println(i);
               Thread.sleep(1000);
          } catch (InterruptedException e) {
              e.getStackTrace();
           }
       }
        System.out.println("时间到");
    }
}
